{% load i18n %}
<div class="reverify-xblock">
  <div class="reverify-now-wrapper">
    {% if remaining_attempts == 0 %}
    <div class="">
      <div class="msg-title">{% trans "Verification unsuccessful" %}</div>
      <div class="msg-content">
        {% blocktrans with support_email=support_email_link|safe %}
        The attempt to verify your identity was unsuccessful. This assessment has closed and you are no longer eligible for credit in this course. If you feel that there has been a mistake, contact {{ support_email }}.
        {% endblocktrans %}
      </div>
    </div>
    {% else %}
    <div class="reverify-now-content">
      {% if not status %}
      <h3 class="msg-title">{% trans "Identity verification required" %}</h3>
      <div class="msg-content">
        {% blocktrans %}
        To receive credit for this course, you must verify your identity every time you receive a verification message.
        If you do not want to verify your identity, you can opt out of verification.
        However, you will no longer be eligible for credit in the course.
        {% endblocktrans %}
      </div>
      {% elif status == "denied" %}
      <div class="msg-title">{% trans "Verification unsuccessful" %}</div>
      <div class="msg-content">
        {% blocktrans with start_link='<a href="#" class="reverify-skip-link">' end_link="</a>" %}
        To receive credit in this course, you must try to verify your identity again. If you do not want to verify your identity, you can {{ start_link }}opt out of verification{{ end_link }}. However, you will no longer be eligible for credit in the course.
        {% endblocktrans %}
      </div>
      {% else %}
      <div class="msg-title">{% trans "Verification error" %}</div>
      <div class="msg-content">
          {% blocktrans with support_email=support_email_link|safe %}
          An error occurred during the verification process.
          Try to verify your identity again, or contact {{ support_email }} for help.
          {% endblocktrans %}
      </div>
      {% endif %}
    </div>
    {% endif %}
    <div class="action-container">
      <a href="#" class="reverify-skip-link action action-default">Opt Out</a>

      {% if remaining_attempts > 0 %}
      <button class="reverify-now-button action action-primary" data-href="{{ reverification_link }}">
        {% if not status %}
        {% trans "Verify Your Identity" %}
        {% else %}
        {% trans "Try Again" %}
        {% endif %}
      </button>
      {% endif %}
    </div>
    <div class="reverify-clear-line"></div>
  </div>

  <div class="reverify-skip-confirm-wrapper hidden">
    <div class="reverify-skip-confirm">

      <div class="msg-title">{% trans "Are you sure you want to opt out of verification?" %}</div>
      <div class="msg-content">
      {% blocktrans %}
      To receive credit for this course, you must verify your identity every time you receive a verification message.
      If you opt out of identity verification, you are no longer eligible for course credit.
      However, you can still work toward a verified certificate.
      {% endblocktrans %}
      </div>

      <div class="reverify-skip-actions">
        <button class="reverify-skip-cancel-button action action-default">{% trans "Verify Your Identity" %}</button>
        <button class="reverify-skip-confirm-button action action-primary">{% trans "Opt Out of Verification and Course Credit" %}</button>
      </div>

      <div class="reverify-clear-line" />
    </div>
  </div>
</div>
<div class="faq-reverification-block">
  <h4>
    {% trans "See Also" %}
  </h4>
  <a class="faq-link">
    {% trans "Frequently asked questions about verification and earning academic credit" %}
  </a>
</div>
